class CreateTeamsPairs < ActiveRecord::Migration
  def self.up
    create_table :teams_pairs, :primary_key=>"team_player_id" do |t|
      t.column :pair_id, :integer
      t.column :team_id, :integer
    end
#    execute "
#      ALTER TABLE teams_pairs ADD FOREIGN KEY (pair_id) REFERENCES pairs (pair_id);
#      ALTER TABLE teams_pairs ADD FOREIGN KEY (team_id) REFERENCES teams (team_id);
#    "
  end

  def self.down
    drop_table :teams_pairs
  end
end
